home *** CD-ROM | disk | FTP | other *** search
- # testing for a memory leak
-
- proc incr_label {} {
- global timer
-
- .lab getValues -labelString n
- incr n
- .lab setValues -labelString $n
- set timer [. addTimer 1 incr_label]
- }
-
- xtAppInitialize
-
- xmPushButton .lab managed -labelString 1000
- .lab activateCallback {. removeTimer $timer; .lab destroyWidget}
-
- set timer [. addTimer 1000 incr_label]
-
- . realizeWidget
-
- . mainLoop
-